package field_method04;

public class RectangleTest {

    public static void main(String[] args) {

        Rectangle rectangle = new Rectangle();

        rectangle.length = 2;
        rectangle.width = 4;

        //这个类 给 调用提供多种方法选择
        double s = rectangle.area();
        System.out.println("面积为" + s);

        double c = rectangle.perimeter();
        System.out.println("周长为" + c);

        String info = rectangle.getInfo();
        System.out.println(info);

    }
}
